import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex);
const store=new Vuex.Store({
	state:{
		userName:'',
		hasLogin:false
	},
	mutations:{
		login(state,name){
			state.userName=name;
			state.hasLogin=true;
		},
		loginOut(state){
			state.userName='';
			state.hasLogin=false;
		}
	}
})
export default store